<layout name="../../../resource/master"/>
<section class="scrollable padder">

    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><a href=""></i> 首页</a></li>
        <li class="active">分类管理</li>

    </ul>


    <section class="panel panel-default">
        <header class="panel-heading">
            分类管理
        </header>
        <div class="row wrapper">
            <div class="col-sm-4 m-b-xs">
                <a href="{:u('admin/category/addtop')}" class="btn btn-default btn-sm">添加顶级分类</a>
            </div>
        </div>

        <div class="table-responsive">
            <table class="table table-striped b-t b-light">
                <thead>
                <tr pid="0">
                        <td>分类id</td>
                        <td>分类名称</td>
                        <td>分类排序</td>
                        <td>是否显示</td>
                        <td>操作</td>
                </tr>
                </thead>
            <tbody>

            <volist name="data" id="vo">
                <tr>
                    <td>{$vo['cid']}</td>
                    <td>{$vo['_cname']}</td>
                    <td>{$vo['sort']}</td>
                    <td><if condition="$vo['is_show']==1">显示
                        <else/>
                        不显示</if>
                    </td>
                    <td>
                        <a href="{:u('admin/category/subset',['cid'=>$vo['cid']])}" class="btn btn-default btn-sm">添加子分类</a>
                        <a href="{:u('admin/category/edit',['cid'=>$vo['cid']])}"  class="btn btn-default btn-sm">编辑</a>
                        <a href="{:u('del',['cid'=>$vo['cid']])}" class="btn btn-default btn-sm">删除</a>
                    </td>
                </tr>
            </volist>

                </tbody>
            </table>
        </div>
        <div class="pagination pagination-sm pull-right">
        </div>
    </section>
</section>